package la.iok.hzsvn.lewin.movie.shopmovie.model;

import la.iok.hzsvn.share.collection.IdAble;

import java.util.Objects;

/**
 * 拼车中玩家的数量
 */
public class CarpoolPlayerCount implements IdAble<Long> {
    private Long carPoolId;
    private Integer count;

    public Long getCarPoolId() {
        return carPoolId;
    }

    public void setCarPoolId(Long carPoolId) {
        this.carPoolId = carPoolId;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof CarpoolPlayerCount)) return false;
        CarpoolPlayerCount that = (CarpoolPlayerCount) o;
        return Objects.equals(carPoolId, that.carPoolId) && Objects.equals(count, that.count);
    }

    @Override
    public int hashCode() {
        return Objects.hash(carPoolId, count);
    }

    @Override
    public String toString() {
        return "CarpoolPlayerCount{" +
                "carPoolId=" + carPoolId +
                ", count=" + count +
                '}';
    }

    @Override
    public Long getId() {
        return carPoolId;
    }
}
